import java.util.Scanner;

public class HJ29 {//字符串加解密
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String password = scanner.nextLine();//待加密字符串
        String codes = scanner.nextLine();//待加密字符串
        String transformedPassword = transformPassword(password);
        String transformCode = transformCode(codes);
        System.out.println(transformedPassword);
        System.out.println(transformCode);
    }

    private static String transformPassword(String password) {
        StringBuilder result = new StringBuilder();
        for (char c :password.toCharArray()) {
            if (Character.isLowerCase(c)) {
                // 处理小写字母
                char UpperCase = Character.toUpperCase(c);
                char shifted = (char) (UpperCase == 'Z' ? 'A' : UpperCase + 1);
                result.append(shifted);
            } else if (Character.isUpperCase(c)) {
                // 处理大写字母
                char lowerCase = Character.toLowerCase(c);
                char shifted = (char) (lowerCase == 'z' ? 'a' : lowerCase + 1);
                result.append(shifted);
            } else if (Character.isDigit(c)) {
                // 处理数字
                char shifted;
                if(c=='9'){
                    shifted = '0';
                }else {
                    shifted = (char) (c + 1);
                }
                result.append(shifted);
            }
        }
        return result.toString();
    }
    private static String transformCode(String password) {
        StringBuilder result = new StringBuilder();
        for (char c :password.toCharArray()) {
            if (Character.isLowerCase(c)) {
                // 处理小写字母
                char UpperCase = Character.toUpperCase(c);
                char shifted = (char) (UpperCase == 'A' ? 'Z' : UpperCase - 1);
                result.append(shifted);
            } else if (Character.isUpperCase(c)) {
                // 处理大写字母
                char lowerCase = Character.toLowerCase(c);
                char shifted = (char) (lowerCase == 'a' ? 'z' : lowerCase - 1);
                result.append(shifted);
            } else if (Character.isDigit(c)) {
                // 处理数字
                char shifted;
                if(c=='0'){
                    shifted ='9';
                }else {
                    shifted = (char) (c - 1);
                }
                result.append(shifted);
            }
        }
        return result.toString();
    }
}